import Vue from 'vue'
import Router from 'vue-router'
import mine from '@/components/mine'
import serviceView from '@/views/service'
import payView from '@/views/pay'
import userView from '@/views/user'
import parkspaceView from '@/views/parkspace'
import repairsView from '@/views/repairs'
import repformView from '@/views/repform'
import complaintsView from '@/views/complaints'
import comformView from '@/views/comform'
import comnumberView from '@/views/comnumber'
import repnumberView from '@/views/repnumber'
import complaintsWatchView from '@/views/complaintsWatch'
import repairsWatchView from '@/views/repairsWatch'
import addcarView from '@/views/addcar' 
import visitorsView from '@/views/visitors' 
import loginView from '@/views/login.vue'
import carView from '@/views/car'
import electricityView from '@/views/electricity'
import waterView from '@/views/water'
import healthView from '@/views/health'
import insureView from '@/views/insure'
import InternetView from '@/views/Internet'
import house from "@/views/house.vue";
import registView from "@/views/regist.vue"
import addHouseView from "@/views/addHouse.vue"
import updateUserView from "@/views/updateUser.vue"


Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      redirect: 'login',
    },
    {
      path: '/login',
      name: 'login',
      component: loginView
    },
    {
      path: '/updateUser',
      name: 'updateUser',
      component: updateUserView
    },
    {
      path: '/serviceView',
      name: 'serviceView',
      component: serviceView
    },
    {
      path: '/regist',
      name: 'regist',
      component: registView
    },
    {
      path: '/addHouse',
      name: 'addHouse',
      component: addHouseView
    },
    {
      path: '/mine',
      name: 'mine',
      component: mine
    },
    {
      path: '/service',
      name: 'service',
      component: serviceView
    },
    {
      path: '/pay',
      name: 'pay',
      component: payView
    },
    {
      path: '/user',
      name: 'user',
      component: userView
    },
    {
      path: '/parkspace',
      name: 'parkspace',
      component: parkspaceView
    },
    {
      path: '/repairs',
      name: 'repairs',
      component: repairsView
    },
    {
      path: '/repform',
      name: 'repform',
      component: repformView
    },
    {
      path: '/complaints',
      name: 'complaints',
      component: complaintsView
    },
    {
      path: '/comform',
      name: 'comform',
      component: comformView
    },
    {
      path: '/comnumber',
      name: 'comnumber',
      component: comnumberView
    },
    {
      path: '/repnumber',
      name: 'repnumber',
      component: repnumberView
    },
    {
      path: '/complaintsWatch',
      name: 'complaintsWatch',
      component: complaintsWatchView
    },
    {
      path: '/repairsWatch',
      name: 'repairsWatch',
      component: repairsWatchView
    },
    {
      path: '/addcar',
      name: 'addcar',
      component: addcarView
    },{
      path: '/visitors',
      name: 'visitors',
      component: visitorsView
    },
    {

      path: '/car',
      component: carView
    },
    {
      path: '/electricity',
      component: electricityView
    },
    {
      path: '/water',
      component: waterView
    },
    {
      path: '/health',
      component: healthView
    },
    {
      path: '/insure',
      component: insureView
    },
    {
      path: '/Internet',
      component: InternetView
    },
 
    {
      path: '/house',
      name: 'house',
      component: house
    }
  ]
})
